package com.wmh.baseservice.common;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.google.zxing.BarcodeFormat;
import com.google.zxing.client.j2se.MatrixToImageWriter;
import com.google.zxing.common.BitMatrix;
import com.google.zxing.qrcode.QRCodeWriter;
import com.qcloud.cos.model.PutObjectRequest;
import com.qcloud.cos.model.PutObjectResult;
import com.sun.scenario.effect.impl.sw.sse.SSEBlend_SRC_OUTPeer;
import com.wmh.baseservice.common.redis.utils.RedisUtil;
import com.wmh.baseservice.common.utils.*;
import com.wmh.baseservice.common.utils.encrypt.Base64Util;
import com.wmh.baseservice.common.utils.encrypt.RSAUtil;
import com.wmh.baseservice.merchant.pojo.MerchantGroupGoodsPrice;
import net.coobird.thumbnailator.Thumbnails;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import sun.misc.BASE64Decoder;

import javax.xml.crypto.Data;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.math.BigDecimal;
import java.net.URL;
import java.nio.file.FileSystems;
import java.nio.file.Path;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;

public class psvm {


    public static void main(String[] args) throws Exception {
        List<BigDecimal> freight = new ArrayList<>();
        if (freight.size() != 0) {
            BigDecimal reduce = freight.stream().reduce(freight.get(0), BigDecimal::max);
            System.out.println(reduce);
        }

    }

    public static void test() throws Exception {
        String img = "D:\\img\\2e3aa7f26ab3223aeb1510e3c9b1cb5d.jpeg";//预压缩图片位置
        String path = "D:\\img\\ceshi\\";//压缩后图片存放位置
        Long size1 = ImgCompressUtils.compression(img, path, "123.jpeg");
        System.out.println("压缩大小后图片大小为：" + size1);
    }
}
